$(function(){
    $(".btn-active-cms_user").click(function (event) {
        event.preventDefault()
        $this=$(this)
        cms_user_id = parseInt($this.attr("data-user-id"))
        is_active = parseInt($this.attr("data-is_active"))
        //alert(is_active)
        data={"is_active":is_active?0:1}
        $.ajax({
            url:"/cms/cms_user/"+cms_user_id,
            method:"PUT",
            data:data,
            success:function (res) {
                alert("修改成功")
                window.location.reload()
            },
            fail:function (err) {
                alert(err)
            }
        })
    })
})